TARGETS = left_right_value pointer_reference mystring reference
all: $(TARGETS)

CPP = g++
CPPFLAGS = -std=c++11 -g 

%.o : %.cpp
	$(CPP) $(CPPFLAGS) -c $< -o $@

left_right_value: left_right_value.o
	$(CPP) $^ -o left_right_value

pointer_reference: pointer_reference.o
	$(CPP) $^ -o pointer_reference

mystring: mystring.o
	$(CPP) $^ -o mystring

reference: reference.o
	$(CPP) $^ -o reference

.PHONY: clean
clean:
	rm -rf *.o $(TARGETS) 